﻿
using IntelligentAgriculture.Domain.Entity;
using System.Threading.Tasks;

namespace IntelligentAgriculture.Domain.Interface.IEarTagReposiotry
{

	public interface IEarTagReposiotry
    {
        /// <summary>
        /// 添加耳标功能
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<int> Add(List<Eartag> entity);

        /// <summary>
        /// 耳标 显示 查询 分页 功能
        /// </summary>
        /// <returns></returns>
       Task<IQueryable<Eartag>> GetShow();

        /// <summary>
        /// 逻辑删除功能
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回受影响行数</returns>
        Task<int> Delete(int id);
        /// <summary>
        /// 批量逻辑删除
        /// </summary>
        /// <param name="ids">数组</param>
        /// <returns>返回受影响行数</returns>
        Task<int> DeleteRange(IEnumerable<int> ids);
        /// <summary>
        /// 修改耳号
        /// </summary>
        /// <param name="eartag"></param>
        /// <returns></returns>
        Task<int> UpdateAsync(Eartag eartag);
		/// <summary>
		/// 批量修改耳号
		/// </summary>
		/// <param name="eartag"></param>
		/// <returns></returns>
		Task<int> UpdateListAsync(List<Eartag> eartag);

        /// <summary>
        /// 显示未使用的耳标
        /// </summary>
        /// <returns></returns>
        Task<IQueryable<Eartag>> ShowStateEartag();
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns>返回列表</returns>
        Task<Eartag> Find(int id);
    }
}
